﻿using Avalon.Core.MVC.Attributes;
using System.ComponentModel.DataAnnotations;

namespace Avalon.Core.Data.Templates {

    /// <summary>
    /// The actual renderer of a view. This object contains the information needed to add a 
    /// renderer to the database. A renderer is always contained in a group. A group is
    /// linked to a controller name.
    /// </summary>
    public class AvalonViewRenderer : BaseAuditableEntity {
        [Required]
        public string Name { get; set; }

        public string Description { get; set; }
        [Required]
        public string Action { get; set; }
        [Required]
        public string Template { get; set; }
        [Required]
        public string Renderer { get; set; }
        [Required]
        public string GetPipeline { get; set; }
        [Required]
        public string PostPipeline { get; set; }

        [Parent]
        public virtual AvalonViewRendererGroup AvalonViewRendererGroup { get; set; }
    }
}
